/* 深色模式样式 - 优化版 (仅颜色和阴影调整) */
[data-theme='dark'] {
	// 更新颜色变量
	--next-bg-main: #121212;
	--next-color-white: #ffffff;
	--next-color-disabled: #1e1e1e;
	--next-color-bar: #e0e0e0;
	--next-color-primary: #BB86FC;
	--next-border-color: #BB86FC;
	--next-border-black: #1f1f1f;
	--next-border-columns: #2a2a2a;
	--next-color-seting: #505050;
	--next-text-color-regular: rgba(255, 255, 255, 0.87);
	--next-text-color-placeholder: rgba(255, 255, 255, 0.38);
	--next-color-hover: #2a2a2a;
	--next-color-hover-rgba: rgba(255, 255, 255, 0.1);

	// 新增状态颜色
	--next-color-success: #25c97b;
	--next-color-warning: #ffb224;
	--next-color-danger: #ff5f7d;
	--next-color-info: #42a5f5;

	// 更新阴影系统
	--next-box-shadow-dark:
		0 4px 12px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.07),
		0 0 16px rgba(187, 134, 252, 0.15);

	--next-box-shadow-hover:
		0 8px 24px rgba(0, 0, 0, 0.6),
		0 0 0 1px rgba(255, 255, 255, 0.12),
		0 0 24px rgba(187, 134, 252, 0.25);

	--next-bg-main-color: var(--next-bg-main) !important;
	--next-bg-topBar: var(--next-color-disabled) !important;
	--next-bg-topBarColor: var(--next-color-bar) !important;
	--next-bg-menuBar: var(--next-color-disabled) !important;
	--next-bg-menuBarColor: var(--next-color-bar) !important;
	--next-bg-menuBarActiveColor: var(--next-color-hover-rgba) !important;
	--next-bg-columnsMenuBar: var(--next-color-disabled) !important;
	--next-bg-columnsMenuBarColor: var(--next-color-bar) !important;
	--next-border-color-light: var(--next-border-color) !important;
	--next-color-primary-lighter: color-mix(in srgb, var(--next-color-primary) 80%, white) !important;
	--next-color-success-lighter: var(--next-color-success) !important;
	--next-color-warning-lighter: var(--next-color-warning) !important;
	--next-color-danger-lighter: var(--next-color-danger) !important;
	--next-bg-color: var(--next-color-primary) !important;
	--next-color-dark-hover: var(--next-color-hover) !important;
	--next-color-menu-hover: var(--next-color-hover-rgba) !important;
	--next-color-user-hover: var(--next-color-hover-rgba) !important;
	--next-color-seting-main: var(--next-color-seting) !important;
	--next-color-seting-aside: var(--next-color-hover) !important;
	--next-color-seting-header: var(--next-color-primary) !important;

	// element plus
	--el-color-white: var(--next-color-disabled) !important;
	--el-text-color-primary: var(--next-color-bar) !important;
	--el-border-color: var(--next-border-color) !important;
	--el-border-color-light: var(--next-border-color) !important;
	--el-border-color-lighter: var(--next-border-color) !important;
	--el-border-color-extra-light: var(--el-color-primary-light-8) !important;
	--el-text-color-regular: var(--next-text-color-regular) !important;
	--el-bg-color: var(--next-color-disabled) !important;
	--el-color-primary: var(--next-color-primary) !important;
	--el-color-success: var(--next-color-success) !important;
	--el-color-warning: var(--next-color-warning) !important;
	--el-color-danger: var(--next-color-danger) !important;
	--el-color-info: var(--next-color-info) !important;
	--el-color-primary-light-9: #1e1e1e !important;
	--el-text-color-disabled: var(--next-text-color-placeholder) !important;
	--el-text-color-disabled-base: var(--el-color-primary) !important;
	--el-text-color-placeholder: var(--next-text-color-placeholder) !important;
	--el-disabled-bg-color: #1a1a1a !important;
	--el-fill-base: var(--next-color-white) !important;
	--el-fill-colo: var(--next-color-hover-rgba) !important;
	--el-fill-color: var(--next-color-hover-rgba) !important;
	--el-fill-color-blank: var(--next-color-disabled) !important;
	--el-fill-color-light: var(--next-color-hover-rgba) !important;
	--el-bg-color-overlay: #252525 !important;
	--el-mask-color: rgb(42 42 42 / 80%);
	--el-fill-color-lighter: var(--next-color-hover) !important;
	--el-bg-color-page: var(--next-bg-main) !important;

	// ===== 全局阴影增强 =====
	.el-card,
	.home-card-item,
	.el-dialog,
	.el-popper,
	.el-alert,
	.notice-bar,
	.tags-style-one .layout-navbars-tagsview-ul-li,
	.el-pagination.is-background .btn-next,
	.el-pagination.is-background .btn-prev,
	.el-pagination.is-background .el-pager li {
		box-shadow: var(--next-box-shadow-dark) !important;
		transition: box-shadow 0.3s ease;
	}

	// 悬停状态阴影增强
	.el-card:hover,
	.home-card-item:hover,
	.tags-style-one .layout-navbars-tagsview-ul-li:hover,
	.el-pagination.is-background .btn-next:not(.disabled):hover,
	.el-pagination.is-background .btn-prev:not(.disabled):hover,
	.el-pagination.is-background .el-pager li:not(.disabled):hover {
		box-shadow: var(--next-box-shadow-hover) !important;
	}

	// 按钮
	.el-button {
		box-shadow:
			0 2px 6px rgba(0, 0, 0, 0.4),
			0 0 0 1px rgba(255, 255, 255, 0.05) !important;
		transition: all 0.3s ease;

		&:not(.is-disabled):hover {
			box-shadow:
				0 4px 10px rgba(0, 0, 0, 0.5),
				0 0 0 1px rgba(255, 255, 255, 0.1) !important;
		}

		// 主按钮特殊效果
		&--primary {
			box-shadow:
				0 2px 8px rgba(0, 0, 0, 0.5),
				0 0 0 1px rgba(255, 255, 255, 0.05),
				0 0 12px rgba(187, 134, 252, 0.3) !important;

			&:hover {
				box-shadow:
					0 4px 14px rgba(0, 0, 0, 0.6),
					0 0 0 1px rgba(255, 255, 255, 0.1),
					0 0 18px rgba(187, 134, 252, 0.4) !important;
			}
		}
	}

	// 输入框
	.el-input__wrapper {
		box-shadow:
			0 0 0 1px var(--el-border-color),
			inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
		transition: box-shadow 0.3s;

		&:hover, &:focus-within {
			box-shadow:
				0 0 0 1px var(--el-color-primary),
				inset 0 1px 3px rgba(0, 0, 0, 0.3),
				0 0 8px rgba(187, 134, 252, 0.2) !important;
		}
	}

	// 卡片底部光效
	.el-card, .home-card-item {
		position: relative;

		&:after {
			content: '';
			position: absolute;
			bottom: -2px;
			left: 0;
			right: 0;
			height: 2px;
			background: rgba(187, 134, 252, 0.3);
			box-shadow: 0 0 10px rgba(187, 134, 252, 0.4);
			z-index: 2;
		}
	}

	// 对话框
	.el-dialog {
		border-top: 3px solid var(--next-color-primary) !important;
	}

	// 状态消息
	.el-alert, .notice-bar {
		border-left: 3px solid var(--el-color-primary) !important;

		&--success {
			border-left-color: var(--next-color-success) !important;
		}
		&--warning {
			border-left-color: var(--next-color-warning) !important;
		}
		&--error {
			border-left-color: var(--next-color-danger) !important;
		}
		&--info {
			border-left-color: var(--next-color-info) !important;
		}
	}

	// ===== 以下是您原有的组件样式（保持不变）=====

	// button
	.el-button {
		&:hover {
			border-color: var(--next-border-color) !important;
		}
	}
	.el-button--primary,
	.el-button--info,
	.el-button--danger,
	.el-button--success,
	.el-button--warning {
		--el-button-text-color: var(--next-color-white) !important;
		--el-button-hover-text-color: var(--next-color-white) !important;
		--el-button-disabled-text-color: var(--next-color-white) !important;
		&:hover {
			border-color: var(--el-button-hover-border-color, var(--el-button-hover-bg-color)) !important;
		}
	}

	// drawer
	.el-divider__text {
		background-color: var(--el-color-white) !important;
	}
	.el-drawer {
		border-left: 1px solid var(--next-border-color-light) !important;
	}

	// tabs
	.el-tabs--border-card {
		background-color: var(--el-color-white) !important;
	}
	.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
		background: var(--next-color-primary-lighter);
	}

	// alert / notice-bar
	.home-card-item {
		border: 1px solid var(--next-border-color-light) !important;
	}
	.el-alert,
	.notice-bar {
		border: 1px solid var(--next-border-color) !important;
		background-color: var(--next-color-disabled) !important;
	}

	// topBar
	.layout-navbars-breadcrumb-index {
		background: none !important;
	}

	// menu
	.layout-aside {
		border-right: 1px solid var(--next-border-color-light) !important;
		@extend .layout-navbars-breadcrumb-index;
	}

	// colorPicker
	.el-color-picker__mask {
		background: unset !important;
	}
	.el-color-picker__trigger {
		border: 1px solid var(--next-border-color-light) !important;
	}

	// popper / dropdown
	.el-popper {
		border: 1px solid var(--next-border-color) !important;
		color: var(--el-text-color-primary) !important;
		.el-popper__arrow:before {
			background: var(--el-color-white) !important;
			border: 1px solid var(--next-border-color);
		}
		a {
			color: var(--el-text-color-primary) !important;
		}
	}
	.el-popper,
	.el-dropdown-menu {
		background: var(--el-color-white) !important;
	}
	.el-dropdown-menu__item:hover:not(.is-disabled) {
		background: var(--el-bg-color) !important;
	}
	.el-dropdown-menu__item.is-disabled {
		font-weight: 700 !important;
	}

	// input
	.el-input-group__append,
	.el-input-group__prepend {
		border: var(--el-input-border) !important;
		border-right: none !important;
		background: var(--next-color-disabled) !important;
		border-left: 0 !important;
	}
	.el-input-number__decrease,
	.el-input-number__increase {
		background: var(--next-color-disabled) !important;
	}

	// tag
	.el-select .el-select__tags .el-tag {
		background-color: var(--next-bg-color) !important;
	}

	// pagination
	.el-pagination.is-background .el-pager li:not(.disabled).active {
		color: var(--next-color-white) !important;
	}
	.el-pagination.is-background .btn-next,
	.el-pagination.is-background .btn-prev,
	.el-pagination.is-background .el-pager li {
		background-color: var(--next-bg-color);
	}
	/*深色模式时分页高亮问题*/
	.el-pagination.is-background .btn-next.is-active,
	.el-pagination.is-background .btn-prev.is-active,
	.el-pagination.is-background .el-pager li.is-active {
		color: var(--next-color-white) !important;
	}

	// radio
	.el-radio-button:not(.is-active) .el-radio-button__inner {
		border: 1px solid var(--next-border-color-light) !important;
		border-left: 0 !important;
	}
	.el-radio-button.is-active .el-radio-button__inner {
		color: var(--next-color-white) !important;
	}

	// countup
	.countup-card-item-flex {
		color: var(--el-text-color-primary) !important;
	}

	// editor
	.editor-container {
		.w-e-toolbar {
			background: var(--el-color-white) !important;
			border: 1px solid var(--next-border-color-light) !important;
			.w-e-menu:hover {
				background: var(--next-color-user-hover) !important;
				i {
					color: var(--el-text-color-primary) !important;
				}
			}
		}
		.w-e-text-container {
			border: 1px solid var(--next-border-color-light) !important;
			border-top: none !important;
			.w-e-text {
				background: var(--el-color-white) !important;
			}
		}
	}

	// date-picker
	.el-picker-panel {
		background: var(--el-color-white) !important;
	}

	// dialog
	.el-dialog {
		border: 1px solid var(--el-border-color-lighter);
		.el-dialog__header {
			color: var(--el-text-color-primary) !important;
		}
	}

	// columns
	.layout-columns-aside ul .layout-columns-active {
		color: var(--next-color-white) !important;
	}
	.layout-columns-aside {
		border-right: 1px solid var(--next-border-columns);
	}

	// tagsView
	.tags-style-one {
		.is-active {
			color: var(--el-text-color-primary) !important;
		}
		.layout-navbars-tagsview-ul-li:hover {
			border-color: var(--el-border-color-lighter) !important;
		}
	}

	// loading
	.el-loading-mask {
		background-color: var(--next-bg-main) !important;
	}
}
